/*
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.t4.irc;

import java.net.InetAddress;
import java.net.UnknownHostException;

/**
 * Configuration
 * @author T4_
 *
 */
public class Configuration {
	
	/** The user's nickname */
	private String nickname = "jic" + ((int) (Math.random() * 1000));
	
	/**
	 * The server's address
	 * @return
	 */
	public InetAddress getServerAddress() {
		try {
			return InetAddress.getByName("irc.gyrat.in");
		} catch (UnknownHostException e) {
			return null;
		}			
	}
	
	/**
	 * The server's port
	 * @return
	 */
	public int getServerPort() {
		return 6667;
	}
	
	/**
	 * Is the server using SSL
	 * @return
	 */
	public boolean isSSL() {
		return false;
	}
	
	/**
	 * The user's nickname
	 * @return
	 */
	public String getNickname() {
		return nickname;
	}
	
	/**
	 * The user's ident
	 * @return
	 */
	public String getIdent() {
		return "jic" + ((int) (Math.random() * 1000));
	}
	
	/**
	 * The channel name
	 * @return
	 */
	public String getChannel() {
		return "#rl";
	}
	

	/**
	 * Sets the user's nickname
	 * @param nickname
	 */
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	
}
